package cn.xinfei.xdecision.common.utils.enums.enginex.action;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 老模型节点枚举
 */
@Getter
@AllArgsConstructor
public enum OldModelActionEnum {

    CASH_ACTIVATE("cashActivate", "现金分期激活"),

    PERSONAL_ACTIVATE("personalActivate", "个人分期激活"),

    CASH_WITHDRAW_SD("cashWithdrawSd", "现金分期首贷提现"),

    PERSONAL_WITHDRAW_SD("personalWithdrawSd", "个人分期首贷提现"),

    CASH_WITHDRAW_FD("cashWithdrawFd", "现金分期加复贷"),

    PERSONAL_WITHDRAW_FD("personalWithdrawFd", "个人分期加复贷");

    private final String type;

    private final String desc;

    public static OldModelActionEnum getByType(String type) {
        for (OldModelActionEnum oldModelActionEnum : OldModelActionEnum.values()) {
            if (oldModelActionEnum.getType().equals(type)) {
                return oldModelActionEnum;
            }
        }
        return null;
    }
}
